<template>
  <div class="choose-wrap" @click="$emit('show')">
      <img class="city-icon" :src="iconUrl" />
      <div class="city-info">
          <div class="city-name" v-if="name">{{name}}</div>
          <div class="city-tips" v-else>{{tipText}}</div>
      </div>
      <van-icon name="arrow" class="arrows-size"/>
  </div>
</template>

<script>
export default {
  props: ['iconUrl', 'name', 'tipText']
};
</script>

<style lang="scss" scoped>

.choose-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 4px;
}
.city-icon {
    width: 34px;
    height: 34px;
    margin-right: 10px;
}
.city-info {
    flex: 1;
}
.city-name {
    font-size: 13px;
    color: $color-text;
}
.city-tips {
    font-size: 12px;
    color: $grey-color;
    margin-top: 5px;
}
</style>
